Accept a filename and print the file extensionΒΆ

Accept a filename from the user and print the extension of that.
Sample filename:
abc.java
Expected Output:
java
filename = input("Input the Filename: ")

f_extns = filename.split(".")

print ("The extension of the file is : " + repr(f_extns[-1]))

Output:

Input the Filename: abc.java
The  extension of the file is : 'java'